<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateGuideAdvTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('guide_adv', function (Blueprint $table) {
            $table ->increments('id') ->comment('引导页表');
            $table ->string('title') ->nullable() ->comment('标题');
            $table ->string('img') ->nullable() ->comment('图片');
            $table ->integer('region_id') ->default('0') ->comment('所属地区ID（1.北洸村）');
            $table ->string('url') ->nullable() ->comment('跳转链接');
            $table ->integer('second') ->nullable() ->comment('秒');
            $table ->tinyInteger('is_show') ->default('0') ->comment('上架状态');
            $table ->timestamp('online_at') ->nullable() ->comment('上线时间');
            $table ->timestamp('offline_at') ->nullable() ->comment('下线时间');
            $table ->timestamps();
            $table ->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('guide_adv', function (Blueprint $table) {
            //
        });
    }
}
